package com.meiyu.live.util;

import android.content.Context;

import com.lidroid.xutils.BitmapUtils;

public class BitmapHelp {

    public static String TYPE_FIXED = "fixed";
    public static String TYPE_MFIT = "mfit";

    private BitmapHelp() {
    }

    private static BitmapUtils bitmapUtils;

    public static BitmapUtils getBitmapUtils(Context appContext) {
        if (bitmapUtils == null) {
            bitmapUtils = new BitmapUtils(appContext);
        }
        return bitmapUtils;
    }

    public static String getImgByCdn(String url, String type, String h, String w) {
        return String.format(url + "?x-oss-process=image/resize,%s,h_%s,w_%s", type, h, w);
    }
}